# Check the status of a AI Aging Generator task.

Endpoint: GET /s2s/v2.0/task/aging/{task_id}
Security: BearerAuthenticationV2

## Security:

  - `BearerAuthenticationV2` (unknown)
    http bearer

## Path parameters:

  - `task_id` (string, required)
    ID of task to check

## Response 200:

  - `200` (unknown)
    Successful check of the task status

## Response 200 fields (application/json):

  - `status` (integer)
    Response status
    Example: 200

  - `data` (object)

  - `data.task_status` (string)
    Status of this task
    Enum: "running", "success", "error"

  - `data.error` (string)
    Errors:
- `error_exceed_max_image_size`  - Input image size exceeds the maximum limit
- `exceed_max_filesize` - Input file size exceeds the maximum limit
- `invalid_parameter` - Invalid parameter value
- `error_download_image` - Download source image error
- `error_download_mask` - Download mask image error
- `error_decode_image` - Decode source image error
- `error_decode_mask` - Decode mask image error
- `error_nsfw_content_detected` - NSFW content detected in source image
- `error_no_face` - No face detected on source image
- `error_pose` - Failed to detect pose on source image
- `error_face_parsing` - Failed to do face segmentation on source image
- `error_inference` - Inference pipeline error
- `exceed_nsfw_retry_limits` - Exceed the retry limits to avoid generated NSFW image
- `error_upload` - Upload result image error
- `unknown_internal_error` - Others
    Enum: "error_exceed_max_image_size", "exceed_max_filesize", "invalid_parameter", "error_download_image", "error_download_mask", "error_decode_image", "error_decode_mask", "error_nsfw_content_detected", "error_no_face", "error_pose", "error_face_parsing", "error_inference", "exceed_nsfw_retry_limits", "error_upload", "unknown_internal_error"

  - `data.error_message` (string)
    Detailed description of error

  - `data.results` (object)

  - `data.results.output` (array)

  - `data.results.output.url` (string)
    URL to download this result. Valid for 2 hours
    Example: https://example.com/sample-result-url

  - `data.results.output.res_age` (integer)
    Age of the result that the AI engine attempts to
generate. Please note that the 'res_age' of the
uploaded file may not correspond to the 'age' in the
results.
    Example: 12

  - `data.results.age` (integer)
    Estimation of the age of the uploaded file by AI engine.
Please be aware that the 'res_age' of the uploaded file, as
found in the 'output' section, may not align with this 'age'
value.
    Example: 21

  - `data.results.agd_idx` (integer)
    Index of the uploaded file in the 'output'. Index is
starting from 0. The first file has index 0, the second file
has index 1, and so on.
    Example: 2

  - `data.results.age_min` (integer)
    Minimum age among files in 'output'
    Example: 12

  - `data.results.age_max` (integer)
    Maximum age among files in 'output'
    Example: 70

  - `data.results.num_of_photos` (integer)
    Number of photos in 'output'
    Example: 16

## Response 400:

  - `400` (unknown)
    Invalid task ID

## Response 400 fields (application/json):

  - `status` (integer)
    Response status
    Example: 400

  - `error` (string)
    Example: Invalid task ID

## Response 401:

  - `401` (unknown)
    Invalid or missing API key

## Response 401 fields (application/json):

  - `status` (integer)
    Response status
    Example: 401

  - `error` (string)
    Example: Invalid API key

## Response 500:

  - `500` (unknown)
    Task execution timeout

## Response 500 fields (application/json):

  - `status` (integer)
    Response status
    Example: 500

  - `error` (string)
    Example: Task execution timed out

